<?php
// tags for text
$lhabiz_tags_allowed = array(
    'name_site' => get_bloginfo('name'),
    'description_site' => get_bloginfo('description'),
    'site_url' => site_url()
);

function lhabiz_get_convertTags($str, $class = '', $after = '') 
{
    global $lhabiz_tags_allowed;
    
	if( $class != '' )
		$class = ' class="' . $class . '"';
		
    $str = str_replace('[', '<span' . $class . '>', $str);
    $str = str_replace(']', '</span>', $str);
    
    foreach( $lhabiz_tags_allowed as $tag => $value )
        $str = str_replace( "%$tag%", $value, $str );
    
    return $str . $after;
}                      

function lhabiz_convertTags($str, $class = '', $after = '') 
{
    echo lhabiz_get_convertTags($str, $class, $after);
}                                 

add_filter( 'widget_title', 'lhabiz_get_convertTags' ); 
add_filter( 'bloginfo', 'lhabiz_get_convertTags' );     

?>